<template>
  <div>
    {{ $store.state.testVue.num }}
    {{ num }}
    {{ test }}
  </div>
</template>

<script>
import { mapState, mapActions, mapGetters } from "vuex";

export default {
  mounted() {
    this.setNum("张宁");
  },
  methods: {
    ...mapActions("testVue", ["setNum"]),
  },
  computed: {
    ...mapState("testVue", ["num"]),
    ...mapGetters("testVue", ["test"]),
  },
};
</script>

<style scoped></style>
